package com.sm.service;

import com.sm.bo.VipOrderBO;
import com.sm.dao.UserVipOrderMapper;
import com.sm.dao.VipDictionaryMapper;
import com.sm.model.UserVipOrder;
import com.sm.model.VipDictionary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VipDictionaryService {

    @Autowired
    private VipDictionaryMapper vipDictionaryMapper;

    /**
     * 根据ID获取vip字典
     */
    public VipDictionary getById(Long id) {
        return vipDictionaryMapper.selectByPrimaryKey(id);
    }

    /**
     * 根据类型查询字典
     * @param type
     * @return
     */
    public List<VipDictionary> list(Integer type) {
        return vipDictionaryMapper.selectByType(type);
    }
}
